package javaapplication1;


import java.awt.Graphics;

public class Bar implements Drawable{
    private Coordenada coordenada;
    private int maximo;
    private final int ancho = 25;
    private final int alto = 7;
    
    public Bar(int coordenadaX, int coordenadaY, int maximo){
        coordenada = new Coordenada(coordenadaX, coordenadaY);
        this.maximo = maximo;
    }

    public Coordenada getCoordenada() {
        return coordenada;
    }
    
    public int getCoordenadaX() {
        return coordenada.getX();
    }
    

    public int getCoordenadaY() {
        return coordenada.getY();
    }

    public int getAlto() {
        return alto;
    }

    public int getAncho() {
        return ancho;
    }

    public int getMaximo() {
        return maximo;
    }
    
    @Override
    public void dibujar(Graphics g) {
        g.drawRect(coordenada.getX(), coordenada.getY(), ancho, alto);
    }

    @Override
    public void aniadir(Drawable drawable) {
        
    }

    @Override
    public void eliminar(Drawable drawable) {
        
    }

    @Override
    public Drawable obtenerHijo(int pos) {
        return null;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }
}
